<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>Examples</title>
	<style type="text/css">
        body {font-family:arial}
	</style>
	<script type="text/javascript" src="http://yui.yahooapis.com/2.7.0/build/yahoo/yahoo-min.js"></script>
	<script type="text/javascript" src="http://yui.yahooapis.com/2.7.0/build/dom/dom-min.js"></script>
	<script type="text/javascript" src="./../metadata.js"></script>
</head>

<body>

<p id="one" class="some_class {item_id: 1, item_label: 'Label 1'}">This is p1</p>
<p id="two" class="some_class" data="{item_id: 2, item_label: 'Label 2'}">This is p2</p>
<p id="three" class="some_class"><script type= "text/javascript">{item_id: 3, item_label: 'Label 3'}</script>This is p3</p>

<script type= "text/javascript">/*<![CDATA[*/

    var dom = YAHOO.util.Dom;
    var metadata = YAHOO.plugin.Metadata;

    metadata.setType("class");
    document.write( metadata.get( dom.get("one") ).item_id + ", " + metadata.get( dom.get("one") ).item_label + "<br />");

    metadata.setType("attr", "data");
    document.write( metadata.get( dom.get("two") ).item_id + ", " + metadata.get( dom.get("two") ).item_label + "<br />");

    metadata.setType("elem", "script");
    document.write( metadata.get( dom.get("three") ).item_id + ", " + metadata.get( dom.get("three") ).item_label + "<br />");

/*]]>*/</script>


</body>
</html>
